package im.eg.service.impl;

import im.eg.service.StudentService;
import im.eg.service.pojo.Student;
import im.eg.spring.anno.Component;

import java.util.Random;

@Component("studentService")
public class StudentServiceImpl implements StudentService {

    @Override
    public Student getStudentById(Integer id) {
        try {
            Thread.sleep(new Random().nextInt(1000));
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        return new Student(id, "engure", 23);
    }
}
